<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>微博达人</title>
<link rel="stylesheet" type="text/css" href="css/other.css" />
<!--[if IE 6]>
<link rel="stylesheet" type="text/css" href="iecss.css" />
<![endif]-->
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/home.js"></script>
<script type="text/javascript" src="js/hotpeople_concern.js"></script>

<script type="text/javascript">     
//<![CDATA[
$(function(){
var $div_li =$("div.hot_tab_menu ul li");
$div_li.click(function(){
$(this).addClass("selected")            //当前<li>元素高亮
.siblings().removeClass("selected");  //去掉其它同辈<li>元素的高亮
var index =  $div_li.index(this);  // 获取当前点击的<li>元素 在 全部li元素中的索引。
$("div.hot_tab_box > div")   	//选取子节点。不选取子节点的话，会引起错误。如果里面还有div
.eq(index).show()   //显示 <li>元素对应的<div>元素
.siblings().hide(); //隐藏其它几个同辈的<div>元素
}).hover(function(){
$(this).addClass("hover");
},function(){
$(this).removeClass("hover");
})
})
//]]>
</script>
</head>
<body onload="startdate(),startTime()">

<?php
include_once 'msg_redirect.php';	/*通过使用cookie，当检查出未登陆，则不予进入home.php，返回index.php*/
if($_COOKIE['TTU'] != "logined"){
	msg_redirect("您还未登录哦！", "index.php");
}?>

<div id="main_container">

	<div id="header" >

       <div class="top_right">
       
            <div class="weather">
              <div class="weather_text" id="date"></div>
              <div class="weather_text" id="time"></div>
              <div class="weather_img">
              <a href="#"><img src="image/w_cloudy.png" border="0" width="60" height="60"/></a></div>
            </div>
            
            <div class="big_banner">
            <a href="#"><img src="image/life.jpg" border="0" width="180" height="100"/></a>
            <a href="#"><img src="image/love.jpg"  border="0" width="180" height="100"/></a>
            <a href="#"><img src="image/reading.jpg" border="0" width="180" height="100"/></a>
         </div>
        
        </div>
    
  
        <div id="logo">
            <a href="index.html"><img src="image/logo.png" alt="" title="" border="0" width="240" height="125" /></a>
	    </div>
        

        

    </div>
    
   <div id="main_content"> 
   
            <div id="menu_tab">
                    <ul id="menu">
                    	<li><a href="home.php">首 页</a></li>
                        <li><a href="#">热 门  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="hotpeople.php">微博达人</a></li>
        						<li><a href="hotweibo.php">热门微博</a></li>
      						</ul>
                      </li>
                         <li><a href="#">应 用 <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="photo.php">相册</a></li>
        						<li><a href="collection.php">收藏</a></li>
                                <li><a href="find.php">找人</a></li>
        						<li><a href="#">我的课表</a></li>
        						<li><a href="#">公文通</a></li>
      						</ul>
                         </li>                                                   
                         <li><a href="my_weibo.php">我的主页</a></li>

                         <li><a href="#">消 息  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="comment.php">查看评论</a></li>
        						<li><a href="cencerns_from.php">查看粉丝</a></li>
        						<li><a href="my_concerns.php">查看关注</a></li>
      						</ul>
                         </li>                     
                         <li><a href="#">帐 号  <img src="image/more.png" /></a>
                         	<ul>
        						<li><a href="account_info">帐号设置</a></li>
        						<li><a href="logout.php">注销</a></li>
      						</ul>
                         </li>
                         
                    </ul>

            </div><!-- end of menu tab -->
            
    
 


   <div class="center_content">
     <div class="center_title"><img src="image/hot_title1.png" width="200" height="60"/></div>
     <div class="divide_ul">
     	<h1>人气排行</h1>
        <div id="cencerns_box">
       <?php 
       /*新添加代码:人气排行前三*/
	  include_once 'sql_connect.php'; 
      include_once 'msg_redirect.php';
    						
      $concerns_sql = mysql_query("select c_no,max(f_num)num from concerns   group by c_no  order by num desc limit 0,3"); 
      $concerns_result = mysql_fetch_array($concerns_sql);
	  $number = 1;
      
      if($concerns_result!=""){
      	do{
      		
      ?>    
      <div class="cencerns_box">
      <div class="number1"><?php  echo $number;$number++;?></div>
    


      <div class="cencerns_img"><img src="<?php 
							/*用以输出用户端的头像*/
							include_once 'sql_connect.php'; 
    						include_once 'msg_redirect.php';
    						$c_no = $concerns_result[0];
    						$show_head_sql = mysql_query("select h_data from head where u_no='$c_no'",$connection);
    						$show_head_result = mysql_fetch_array($show_head_sql);
    						$my_data = $show_head_result[h_data];
    						if (!$my_data){
    							echo "head_image/09.jpg";
    						}
    						else echo "$my_data";
    						?>" width="45" height="45" border="0" /></div>
      <div class="cencerns_name"><?php 
                           /*显示昵称*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_name from user_info where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   			
    						$c_name = $user_data;
    						echo "$user_data";
    						?></div>
      <div class="cencerns_from"><?php 
                           /*显示学院*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_dept from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
      <span id="u_name" style="display:none"><?php echo $c_name;?></span>
      <div class="cencerns_button"><a href="##">+ 加关注</a></div>
      <div class="cencerns_f">关注<?php
                            /*显示关注数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(c_num) from concerns where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;粉丝<?php
    					    /*显示粉丝数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(f_num) from concerns where c_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;微博<?php
    					   /*显示微博数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(w_num) from weibo where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;</div>
      <div class="cencerns_info">简介:<?php 
                           /*显示简介*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_mydesc from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>

      <span class="border_cen2"></span> 
      </div>
	  <?php 
        /*新添加代码:人气排行前三，循环语句*/
      }while($concerns_result = mysql_fetch_array($concerns_sql));
      }
      ?>
      </div>
      <div id="cencerns_box">
       <?php 
        /*新添加代码:人气排行前四到十*/
	  include_once 'sql_connect.php'; 
      include_once 'msg_redirect.php';
    						
      $concerns_sql = mysql_query("select c_no,max(f_num)num from concerns   group by c_no  order by num desc limit 4,7"); 
      $concerns_result = mysql_fetch_array($concerns_sql);
	  $number=4;
      
      if($concerns_result!=""){
      	do{
      		
      ?>  

      <div class="cencerns_box">
        <div class="number2"><?php  echo $number;$number++;?></div>
        
        <div class="cencerns_img"><img src="<?php 
							/*用以输出用户端的头像*/
							include_once 'sql_connect.php'; 
    						include_once 'msg_redirect.php';
    						$c_no = $concerns_result[0];
    						$show_head_sql = mysql_query("select h_data from head where u_no='$c_no'",$connection);
    						$show_head_result = mysql_fetch_array($show_head_sql);
    						$my_data = $show_head_result[h_data];
    						if (!$my_data){
    							echo "head_image/09.jpg";
    						}
    						else echo "$my_data";
    						?>" width="45" height="45" border="0" /></div>
        <div class="cencerns_name"><?php 
                           /*显示昵称*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_name from user_info where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];  
    						$c_name = $user_data; 						
    						echo "$user_data";
    						?></div>
        <div class="cencerns_from"><?php 
                           /*显示学院*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_dept from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
    	<span id="u_name" style="display:none"><?php echo $c_name;?></span>
        <div class="cencerns_button"><a href="##">+ 加关注</a></div>
        <div class="cencerns_f">关注<?php
                            /*显示关注数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(c_num) from concerns where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;粉丝<?php
    					    /*显示粉丝数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(f_num) from concerns where c_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;微博<?php
    					   /*显示微博数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(w_num) from weibo where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;</div>
        <div class="cencerns_info">简介:<?php 
                           /*显示简介*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_mydesc from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
        <span class="border_cen2"></span>
        
      </div>
      
      <?php 
       /*新添加代码:人气排行前四到十，循环语句*/
      }while($concerns_result = mysql_fetch_array($concerns_sql));
      }
      ?>

        </div>
     </div>
     <div class="divide"></div>
     <div class="divide_ul">
     	<h1>影响力排行</h1>
        <div id="cencerns_box">
        
       <?php 
       /*新添加代码:影响排行前三*/
	  include_once 'sql_connect.php'; 
      include_once 'msg_redirect.php';
    						
      $concerns_sql = mysql_query("select u_no,max(t_times)times from weibo  GROUP by u_no  order by t_times desc  limit 0,3"); 
      $concerns_result = mysql_fetch_array($concerns_sql);
      $number=1;
	  
      if($concerns_result!=""){
      	do{
      		
      ?>  
        
      <div class="cencerns_box">
      <div class="number1"><?php  echo $number;$number++;?></div>

      <div class="cencerns_img"><img src="<?php 
							/*用以输出用户端的头像*/
							include_once 'sql_connect.php'; 
    						include_once 'msg_redirect.php';
    						$c_no = $concerns_result[0];
    						$show_head_sql = mysql_query("select h_data from head where u_no='$c_no'",$connection);
    						$show_head_result = mysql_fetch_array($show_head_sql);
    						$my_data = $show_head_result[h_data];
    						if (!$my_data){
    							echo "head_image/09.jpg";
    						}
    						else echo "$my_data";
    						?>" width="45" height="45" border="0" /></div>
      <div class="cencerns_name"><?php 
                           /*显示昵称*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_name from user_info where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   	
    						$c_name = $user_data;					
    						echo "$user_data";
    						?></div>
      <div class="cencerns_from"><?php 
                           /*显示学院*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_dept from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
      <span id="u_name" style="display:none"><?php echo $c_name;?></span>
      <div class="cencerns_button"><a href="##">+ 加关注</a></div>
      <div class="cencerns_f">关注<?php
                            /*显示关注数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(c_num) from concerns where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;粉丝<?php
    					    /*显示粉丝数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(f_num) from concerns where c_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;微博<?php
    					   /*显示微博数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(w_num) from weibo where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;</div>
      <div class="cencerns_info">简介:<?php 
                           /*显示简介*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_mydesc from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
      <span class="border_cen2"></span>

      </div>
      
      <?php 
       /*新添加代码:影响排行前三，循环语句*/
      }while($concerns_result = mysql_fetch_array($concerns_sql));
      }
      ?>
      </div>
      <div id="cencerns_box">
       <?php 
       /*新添加代码:影响排行四到十*/
	  include_once 'sql_connect.php'; 
      include_once 'msg_redirect.php';
    						
      $concerns_sql = mysql_query("select u_no,max(t_times)times from weibo  GROUP by u_no  order by t_times desc   limit 4,7"); 
      $concerns_result = mysql_fetch_array($concerns_sql);
      $number=4;
	  
      if($concerns_result!=""){
      	do{
      		
      ?>       
      <div class="cencerns_box">      
        <div class="number2"><?php  echo $number;$number++;?></div>
        
        <div class="cencerns_img"><img src="<?php 
							/*用以输出用户端的头像*/
							include_once 'sql_connect.php'; 
    						include_once 'msg_redirect.php';
    						$c_no = $concerns_result[0];
    						$show_head_sql = mysql_query("select h_data from head where u_no='$c_no'",$connection);
    						$show_head_result = mysql_fetch_array($show_head_sql);
    						$my_data = $show_head_result[h_data];
    						if (!$my_data){
    							echo "head_image/09.jpg";
    						}
    						else echo "$my_data";
    						?>" width="45" height="45" border="0" /></div>
        <div class="cencerns_name"><?php 
                           /*显示昵称*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_name from user_info where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   
    						$c_name = $user_data;						
    						echo "$user_data";
    						?></div>
        <div class="cencerns_from"><?php 
                           /*显示学院*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_dept from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
    	<span id="u_name" style="display:none"><?php echo $c_name;?></span>
        <div class="cencerns_button"><a href="##">+ 加关注</a></div>
        <div class="cencerns_f">关注<?php
                            /*显示关注数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(c_num) from concerns where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;粉丝<?php
    					    /*显示粉丝数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(f_num) from concerns where c_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;|&nbsp;&nbsp;微博<?php
    					   /*显示微博数量*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
  
                            $c_no = $concerns_result[0];
    						$show_sql = mysql_query("select max(w_num) from weibo where u_no='$c_no'",$connection);
    						$show_result = mysql_fetch_array($show_sql);
    						$my_data = $show_result[0];   						
    						echo "$my_data";
    						  ?>&nbsp;&nbsp;</div>
        <div class="cencerns_info">简介:<?php 
                           /*显示简介*/
                           include_once("sql_connect.php");
                           include_once("msg_redirect.php");
                   
                            $c_no = $concerns_result[0];
    						$user_sql = mysql_query("select u_mydesc from user_detail where u_no='$c_no'",$connection);
    						$user_result = mysql_fetch_array($user_sql);
    						$user_data = $user_result[0];   						
    						echo "$user_data";
    						?></div>
        <span class="border_cen2"></span>
        
      </div>
      
      <?php 
       /*新添加代码:影响排行四到十，循环语句*/
      }while($concerns_result = mysql_fetch_array($concerns_sql));
      }
      ?>
      
        </div>
     </div>
     </div>
   
   </div><!-- end of center content -->

  
   
   
   <div class="footer">深圳大学计算机与软件学院@毕业设计项目网站<br />指导老师：王华明<br />项目负责：陈作鑫<br />
    小组成员：陈作鑫&nbsp;&nbsp;陈志杰&nbsp;&nbsp;赖晓东
    </div>                 


</div>
<!-- end of main_container -->
</body>
</html>